import 'package:enterprise_v6_app/app/core/http/http.dart';
import 'package:enterprise_v6_app/app/core/utils/interface.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/get_control_measures_all_details_entity.dart';
import 'package:get/get.dart';

/// 风险管控清单详情 措施详情
class TaskDetailsController extends GetxController {
  GetControlMeasuresAllDetailsEntity? data;

  @override
  void onInit() {
    super.onInit();
    _getControlMeasuresAllDetails();
  }

  ///获取风险管控措施全信息
  void _getControlMeasuresAllDetails() async {

    final res = await HttpUtil()
        .generateGetRequest<GetControlMeasuresAllDetailsEntity>(
          Interface.getControlMeasuresAllDetails,
          queryParameters: {'id':Get.arguments},
        )
        .execute();
     res.onSuccess((result) {
      if (result.data != null) {
        data = result.data!;
      }
    });
    update();
  }
}
